home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / contrib / bstfiles.zoo / chicago.sty < prev    next >
Text File  |  1992-08-05  |  8KB  |  191 lines

  1. % -*- LaTeX -*-
  2. %
  3. % chicago.sty: Style file for use with bibtex style chicago.bst.
  4. %
  5. % 'newapa.bst' was made from 'plain.bst', 'named.bst', and 'apalike.bst',
  6. % with lots of tweaking to make it look like APA style, along with tips
  7. % from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
  8. % newapa.sty formed the basis of this style, chicago.sty. Author-date
  9. % references in newapa.bst formed the basis for chicago.bst. Chicagoa.bst
  10. % supports annotations.
  11. %
  12. % Several bug fixes (such as spacing problems due to no ``%'' used at the
  13. % end of lines in function \def's) and enhancements (additional \cite
  14. % styles) by Glenn Paulley, University of Waterloo. Most enhancements
  15. % are from the Chicago Manual of Style.
  16. %
  17. %   Citation format: (author-last-name year)
  18. %             (author-last-name and author-last-name year)
  19. %             (author-last-name et al. year)
  20. %             (author-last-name)
  21. %             author-last-name
  22. %             author-last-name (year)
  23. %             (author-last-name and author-last-name)
  24. %             (author-last-name et al.)
  25. %             (year) or (year,year)
  26. %             year or year,year
  27. %
  28. %   Reference list ordering: alphabetical by author or whatever passes
  29. %    for author in the absence of one.
  30. %
  31. % This BibTeX style has support for abbreviated author lists and for
  32. %    year-only citations.  This is done by having the citations
  33. %    actually look like
  34. %
  35. %    \citeauthoryear{full-author-info}{abbrev-author-info}{year}
  36. %
  37. % The LaTeX style has to have the following (or similar)
  38. %
  39. %     \let\@internalcite\cite
  40. %     \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
  41. %     \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
  42. %     \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
  43. %     \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
  44. %     \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
  45. %
  46. % -------------------------------------------------------------------------
  47. % This file implements citations for the ``chicago'' bibliography style.
  48. %  Place it in a file called chicago.sty in the TeX search path.
  49. %(Placing it in the same directory as the LaTeX document should also work.)
  50. %
  51. %    This file is a modification of the ``newapa'' LaTeX style,
  52. %    originally adapted by Steven Spencer from the ``apalike'' LaTeX style.
  53. %    It was originally modified by Stephen N. Spencer, with further
  54. %    modifications by Young U. Ryu.
  55. %
  56. % The ``chicago'' BibTeX bibliography style creates citations with labels:
  57. %       \citeauthoryear{author-info}{abbrev. author-info}{year}
  58. %
  59. % These labels are processed by the following LaTeX commands:
  60. %
  61. %  \cite{key}
  62. %    which produces citations with full author list and year.
  63. %    eg. (Brown 1978; Jarke, Turner, Stohl, et al. 1985)
  64. %  \citeNP{key}
  65. %    which produces citations with full author list and year, but without
  66. %    enclosing parentheses:
  67. %    eg. Brown 1978; Jarke, Turner and Stohl 1985
  68. %  \citeA{key}
  69. %    which produces citations with only the full author list.
  70. %    eg. (Brown; Jarke, Turner and Stohl)
  71. %  \citeANP{key}
  72. %    which produces citations with only the full author list, without
  73. %    parentheses eg. Brown; Jarke, Turner and Stohl
  74. %  \citeN{key}
  75. %    which produces citations with the full author list and year, but
  76. %    can be used as nouns in a sentence; no parentheses appear around
  77. %    the author names, but only around the year.
  78. %      eg. Shneiderman (1978) states that......
  79. %    \citeN should only be used for a single citation.
  80. %  \shortcite{key}
  81. %    which produces citations with abbreviated author list and year.
  82. %  \shortciteNP{key}
  83. %    which produces citations with abbreviated author list and year.
  84. %  \shortciteA{key}
  85. %    which produces only the abbreviated author list.
  86. %  \shortciteANP{key}
  87. %    which produces only the abbreviated author list.
  88. %  \shortciteN{key}
  89. %    which produces the abbreviated author list and year, with only the
  90. %    year in parentheses. Use with only one citation.
  91. %  \citeyear{key}
  92. %    which produces the year information only, within parentheses.
  93. %  \citeyearNP{key}
  94. %    which produces the year information only.
  95. %
  96. % Abbreviated author lists use the ``et al.'' construct.
  97. %
  98. % `NP' means `no parentheses'.
  99. %
  100. % This LaTeX style file must be used with the ``chicago'' or ``chicagoa''
  101. % (annotated chicago style) BibTeX styles.
  102. %
  103. \typeout{Using Chicago Manual of Style bibliography: July 30, 1992}
  104. %
  105. % -------------------------------------------------------------------------
  106. %
  107. % Citation macros.
  108. %
  109. \let\@internalcite\cite
  110. %
  111. \def\cite{\def\@citeseppen{-1000}%
  112.     \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
  113.     \def\citeauthoryear##1##2##3{##1 ##3}\@internalcite}
  114. \def\citeNP{\def\@citeseppen{-1000}%
  115.     \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
  116.     \def\citeauthoryear##1##2##3{##1 ##3}\@internalcite}
  117. \def\citeN{\def\@citeseppen{-1000}%
  118.     \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}%
  119.     \def\citeauthoryear##1##2##3{##1 (##3}\@citedata}
  120. \def\citeA{\def\@citeseppen{-1000}%
  121.     \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
  122.     \def\citeauthoryear##1##2##3{##1}\@internalcite}
  123. \def\citeANP{\def\@citeseppen{-1000}%
  124.     \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
  125.     \def\citeauthoryear##1##2##3{##1}\@internalcite}
  126. %
  127. \def\shortcite{\def\@citeseppen{-1000}%
  128.     \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
  129.     \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
  130. \def\shortciteNP{\def\@citeseppen{-1000}%
  131.     \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
  132.     \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
  133. \def\shortciteN{\def\@citeseppen{-1000}%
  134.     \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}%
  135.     \def\citeauthoryear##1##2##3{##2 (##3}\@citedata}
  136. \def\shortciteA{\def\@citeseppen{-1000}%
  137.     \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
  138.     \def\citeauthoryear##1##2##3{##2}\@internalcite}
  139. \def\shortciteANP{\def\@citeseppen{-1000}%
  140.     \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
  141.     \def\citeauthoryear##1##2##3{##2}\@internalcite}
  142. %
  143. \def\citeyear{\def\@citeseppen{-1000}%
  144.     \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
  145.     \def\citeauthoryear##1##2##3{##3}\@citedata}
  146. \def\citeyearNP{\def\@citeseppen{-1000}%
  147.     \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
  148.     \def\citeauthoryear##1##2##3{##3}\@citedata}
  149.  
  150. %
  151. % \@citedata and \@citedatax:
  152. %
  153. % Place commas in-between citations in the same \citeyear, \citeyearNP,
  154. % \citeN, or \shortciteN command.
  155. % Use something like \citeN{ref1,ref2,ref3} and \citeN{ref4} for a list.
  156. %
  157. \def\@citedata{%
  158.     \@ifnextchar [{\@tempswatrue\@citedatax}%
  159.                   {\@tempswafalse\@citedatax[]}%
  160. }
  161.  
  162. \def\@citedatax[#1]#2{%
  163. \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
  164.   \def\@citea{}\@cite{\@for\@citeb:=#2\do%
  165.     {\@citea\def\@citea{, }\@ifundefined% by Young
  166.        {b@\@citeb}{{\bf ?}%
  167.        \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
  168. {\csname b@\@citeb\endcsname}}}{#1}}%
  169.  
  170. % don't box citations, separate with ; and a space
  171. % also, make the penalty between citations negative: a good place to break.
  172. %
  173. \def\@citex[#1]#2{%
  174. \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
  175.   \def\@citea{}\@cite{\@for\@citeb:=#2\do%
  176.     {\@citea\def\@citea{; }\@ifundefined% by Young
  177.        {b@\@citeb}{{\bf ?}%
  178.        \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
  179. {\csname b@\@citeb\endcsname}}}{#1}}%
  180.  
  181. % (from apalike.sty)
  182. % No labels in the bibliography.
  183. %
  184. \def\@biblabel#1{}
  185.  
  186. % (from apalike.sty)
  187. % Set length of hanging indentation for bibliography entries.
  188. %
  189. \newlength{\bibhang}
  190. \setlength{\bibhang}{2em}
  191.